Release 10.1A: OpenEdge Development:
Progress 4GL Handbook


Dynamic programming considerations

Using a dynamic object lets you make everything about the data run-time defined, including the table name, the WHERE clause for the records you select, and so on. It’s important to note here some basic principles of dynamic programming that pertain specifically to transaction management.

The basic rule of dynamic programming is that, because you are defining a procedure’s behavior at run time, it is not possible for Progress to provide as much default behavior as it does for a statically defined procedure or to give you compile errors for constructs that are incorrect. You have much more responsibility to make sure that your program functions properly at run time with the entire range of possible data input that can drive its dynamic behavior. Because of this, there are a few basic rules you need to strictly adhere to when you’re doing dynamic programming. These rules apply to static programming as well, but they are more essential in a dynamic procedure. Partly, this is because a dynamic procedure provides less predictable default behavior and has more flexibility in what it might be expected to do at run time. Also, it is because you cannot use tools such as the LISTING file to confirm the record scope and transaction scope for your procedure, because Progress cannot determine them with certainty until run time.

Here are the rules:

Once again, these are valuable guidelines for any procedure, but especially so for one that uses dynamic statements.

The next and final chapter provides more guidelines on how to best develop applications with the Progress 4GL.


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095